Optimal. Leaf size=361 \[ \frac {\sqrt {\sqrt {a}-\sqrt {a+b}} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a+b}+\sqrt {a}}-\sqrt {2} \sqrt [4]{a} \tanh (x)}{\sqrt {\sqrt {a}-\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {a+b}}-\frac {\sqrt {\sqrt {a}-\sqrt {a+b}} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a+b}+\sqrt {a}}+\sqrt {2} \sqrt [4]{a} \tanh (x)}{\sqrt {\sqrt {a}-\sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt {a+b}}-\frac {\sqrt {\sqrt {a+b}+\sqrt {a}} \log \left (-\sqrt {2} \sqrt [4]{a} \sqrt {\sqrt {a+b}+\sqrt {a}} \tanh (x)+\sqrt {a+b}+\sqrt {a} \tanh ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt {a+b}}+\frac {\sqrt {\sqrt {a+b}+\sqrt {a}} \log \left (\sqrt {2} \sqrt [4]{a} \sqrt {\sqrt {a+b}+\sqrt {a}} \tanh (x)+\sqrt {a+b}+\sqrt {a} \tanh ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.04, antiderivative size = 485, normalized size of antiderivative = 1.34, number of steps used = 10, number of rules used = 6, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {3209, 1169, 634, 618, 204, 628} \[ -\frac {\left (\sqrt {a+b}+\sqrt {a}\right ) \log \left ((a+b)^{3/4} \coth ^2(x)-\sqrt {2} \sqrt [4]{a} \sqrt {\sqrt {a} \sqrt {a+b}+a+b} \coth (x)+\sqrt {a} \sqrt [4]{a+b}\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {\sqrt {a} \sqrt {a+b}+a+b}}+\frac {\left (\sqrt {a+b}+\sqrt {a}\right ) \log \left ((a+b)^{3/4} \coth ^2(x)+\sqrt {2} \sqrt [4]{a} \sqrt {\sqrt {a} \sqrt {a+b}+a+b} \coth (x)+\sqrt {a} \sqrt [4]{a+b}\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {\sqrt {a} \sqrt {a+b}+a+b}}+\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \tan ^{-1}\left (\frac {\sqrt [4]{a} \sqrt {\sqrt {a} \sqrt {a+b}+a+b}-\sqrt {2} (a+b)^{3/4} \coth (x)}{\sqrt [4]{a} \sqrt {-\sqrt {a} \sqrt {a+b}+a+b}}\right )}{2 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {-\sqrt {a} \sqrt {a+b}+a+b}}-\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \tan ^{-1}\left (\frac {\sqrt {2} (a+b)^{3/4} \coth (x)+\sqrt [4]{a} \sqrt {\sqrt {a} \sqrt {a+b}+a+b}}{\sqrt [4]{a} \sqrt {-\sqrt {a} \sqrt {a+b}+a+b}}\right )}{2 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {-\sqrt {a} \sqrt {a+b}+a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 1169
Rule 3209
Rubi steps
\begin {align*} \int \frac {1}{a+b \cosh ^4(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1-x^2}{a-2 a x^2+(a+b) x^4} \, dx,x,\coth (x)\right )\\ &=\frac {\sqrt [4]{a+b} \operatorname {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}-\left (1+\frac {\sqrt {a}}{\sqrt {a+b}}\right ) x}{\frac {\sqrt {a}}{\sqrt {a+b}}-\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt {2} a^{3/4} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}+\frac {\sqrt [4]{a+b} \operatorname {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+\left (1+\frac {\sqrt {a}}{\sqrt {a+b}}\right ) x}{\frac {\sqrt {a}}{\sqrt {a+b}}+\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt {2} a^{3/4} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}\\ &=-\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {1}{\frac {\sqrt {a}}{\sqrt {a+b}}-\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{4 \sqrt {a} (a+b)}-\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {1}{\frac {\sqrt {a}}{\sqrt {a+b}}+\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{4 \sqrt {a} (a+b)}-\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {-\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+2 x}{\frac {\sqrt {a}}{\sqrt {a+b}}-\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}+\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+2 x}{\frac {\sqrt {a}}{\sqrt {a+b}}+\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} x}{(a+b)^{3/4}}+x^2} \, dx,x,\coth (x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}\\ &=-\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \log \left (\sqrt {a} \sqrt [4]{a+b}-\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} \coth (x)+(a+b)^{3/4} \coth ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}+\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \log \left (\sqrt {a} \sqrt [4]{a+b}+\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} \coth (x)+(a+b)^{3/4} \coth ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}+\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {2 \sqrt {a} \left (a+b-\sqrt {a} \sqrt {a+b}\right )}{(a+b)^{3/2}}-x^2} \, dx,x,-\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+2 \coth (x)\right )}{2 \sqrt {a} (a+b)}+\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {2 \sqrt {a} \left (a+b-\sqrt {a} \sqrt {a+b}\right )}{(a+b)^{3/2}}-x^2} \, dx,x,\frac {\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+2 \coth (x)\right )}{2 \sqrt {a} (a+b)}\\ &=\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \tan ^{-1}\left (\frac {(a+b)^{3/4} \left (\frac {\sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}-\sqrt {2} \coth (x)\right )}{\sqrt [4]{a} \sqrt {a+b-\sqrt {a} \sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b-\sqrt {a} \sqrt {a+b}}}-\frac {\left (\sqrt {a}-\sqrt {a+b}\right ) \tan ^{-1}\left (\frac {(a+b)^{3/4} \left (\frac {\sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}{(a+b)^{3/4}}+\sqrt {2} \coth (x)\right )}{\sqrt [4]{a} \sqrt {a+b-\sqrt {a} \sqrt {a+b}}}\right )}{2 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b-\sqrt {a} \sqrt {a+b}}}-\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \log \left (\sqrt {a} \sqrt [4]{a+b}-\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} \coth (x)+(a+b)^{3/4} \coth ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}+\frac {\left (\sqrt {a}+\sqrt {a+b}\right ) \log \left (\sqrt {a} \sqrt [4]{a+b}+\sqrt {2} \sqrt [4]{a} \sqrt {a+b+\sqrt {a} \sqrt {a+b}} \coth (x)+(a+b)^{3/4} \coth ^2(x)\right )}{4 \sqrt {2} a^{3/4} \sqrt [4]{a+b} \sqrt {a+b+\sqrt {a} \sqrt {a+b}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.24, size = 121, normalized size = 0.34 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+i \sqrt {a} \sqrt {b}}}\right )}{2 \sqrt {a} \sqrt {a+i \sqrt {a} \sqrt {b}}}-\frac {\tan ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {-a+i \sqrt {a} \sqrt {b}}}\right )}{2 \sqrt {a} \sqrt {-a+i \sqrt {a} \sqrt {b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.91, size = 771, normalized size = 2.14 \[ -\frac {1}{4} \, \sqrt {\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + 1}{a^{2} + a b}} \log \left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + 2 \, {\left (a b + {\left (a^{4} + a^{3} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}}\right )} \sqrt {\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + 1}{a^{2} + a b}} + 2 \, {\left (a^{3} + a^{2} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + b\right ) + \frac {1}{4} \, \sqrt {\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + 1}{a^{2} + a b}} \log \left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} - 2 \, {\left (a b + {\left (a^{4} + a^{3} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}}\right )} \sqrt {\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + 1}{a^{2} + a b}} + 2 \, {\left (a^{3} + a^{2} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + b\right ) - \frac {1}{4} \, \sqrt {-\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} - 1}{a^{2} + a b}} \log \left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + 2 \, {\left (a b - {\left (a^{4} + a^{3} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}}\right )} \sqrt {-\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} - 1}{a^{2} + a b}} - 2 \, {\left (a^{3} + a^{2} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + b\right ) + \frac {1}{4} \, \sqrt {-\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} - 1}{a^{2} + a b}} \log \left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} - 2 \, {\left (a b - {\left (a^{4} + a^{3} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}}\right )} \sqrt {-\frac {{\left (a^{2} + a b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} - 1}{a^{2} + a b}} - 2 \, {\left (a^{3} + a^{2} b\right )} \sqrt {-\frac {b}{a^{5} + 2 \, a^{4} b + a^{3} b^{2}}} + b\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.09, size = 121, normalized size = 0.34 \[ \frac {\left (\munderset {\textit {\_R} =\RootOf \left (\left (a +b \right ) \textit {\_Z}^{8}+\left (-4 a +4 b \right ) \textit {\_Z}^{6}+\left (6 a +6 b \right ) \textit {\_Z}^{4}+\left (-4 a +4 b \right ) \textit {\_Z}^{2}+a +b \right )}{\sum }\frac {\left (-\textit {\_R}^{6}+3 \textit {\_R}^{4}-3 \textit {\_R}^{2}+1\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{7} a +\textit {\_R}^{7} b -3 \textit {\_R}^{5} a +3 \textit {\_R}^{5} b +3 \textit {\_R}^{3} a +3 \textit {\_R}^{3} b -\textit {\_R} a +\textit {\_R} b}\right )}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{b \cosh \relax (x)^{4} + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.55, size = 1563, normalized size = 4.33 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________